import time
# 导入webdriver
from appium import webdriver
from conftest import BASE_DIR

# 初始化app的配置信息
caps={}
caps['automationName'] = 'UiAutomator2'
caps['platformName']='Android'
caps['platformVersion']='5.1.1'
caps['deviceName']='emulator-5554'
caps['appPackage']='com.android.settings' #表示的是app的包名
caps['appActivity']='.Settings' #界面名---可以理解被测程序
driver=webdriver.Remote('http://127.0.0.1:4723/wd/hub',caps)

driver.close_app()
#安装263.APk
apk_path=BASE_DIR + r'\apk\com.tpshop.malls_2.1.0_2.apk'
driver.install_app(apk_path)
